<?=view("home.common.header")?>
<div class="container-fluid">
        <div class="row">
            <div class="col-xs-12 col-sm-12 bottom-line">
                <i class="glyphicon glyphicon-chevron-right jt"></i><span class="headfont"><?=$pcate->rate?>M光纤</span>
            </div>
        </div>
        <div class="row">
            <div class="col-xs-12 col-sm-12">
                <div class="sh font14">经济<?= $pcate->name?>,轻松自由看世界</div>
                <div  class="kdsl">宽带速率</div>
                <div class="jdt jdt_<?= $pcate->rate?>m">
                    <img src="<?= asset("images/jdt_{$pcate->rate}M.png") ?>">
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-xs-12 col-sm-12">
                <div class="kdsl">选择地区</div>
            </div>
            <div class="col-xs-12 col-md-12 area">
                <?php foreach ($areas as $val): ?>
                <a href="<?= url("home/index/product?ptype={$request->input("ptype")}&pcate={$request->input("pcate")}&area={$val->id}")?>" <?php if ($val->id == $request->input("area")): ?>class="active"<?php endif; ?>><?= $val->name?></a>
                <?php endforeach; ?>
            </div>
        </div>
        <div class="row">
            <div class="col-xs-12 col-sm-12">
                <div class="kdsl">优惠套餐</div>
                <?php if ($products && count($products)): ?>
                <div class="list">
                    <table class="table table-bordered mbottom0">
                        <tr> 
                            <td>套餐时长</td> 
                            <td>价格</td> 
                            <td>月均</td> 
                        </tr>
                        <?php foreach ($products as $val): ?>
                        <tr> 
                            <td><?= $val->lot ?></td> 
                            <td><?= $val->price ?>元</td> 
                            <td><?= $val->strMonthPrice() ?>元</td> 
                        </tr>
                        <?php endforeach; ?>
                    </table>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-xs-12 col-sm-12 padding0">
                <a href="<?= url("home/index/plot?ptype={$request->input('ptype')}&pcate={$request->input('pcate')}&area={$request->input('area')}"); ?>">
                    <img id="rotatey1" class="bottom-img img-shadow" src="<?=asset("images/bottom.PNG")?>">
                </a>
            </div>
        </div>
        <?php else: ?>
            该地区暂时没有<?= $pcate->name ?>优惠套餐
            </div>
        </div>
        <?php endif; ?>
    </div>
    <script>
        var msg = '<?= $msg ?>';
        if (msg) {
            layer.open({
                content: msg,
                style: 'background-color:#09C1FF; color:#fff; border:none;',
                time: 2
            });
            window.setTimeout(function(){
                window.location.href = '<?=url("home/person/setinfo")?>'
            }, 2000);
        }
    </script>
    <script>
//        window.onload = function(){
//            rotateYDIV();
//        };
//        <!--
//        var x,y,n=0,ny=0,rotINT,rotYINT
//        function rotateDIV()
//        {
//            x=document.getElementById("rotate1")
//            clearInterval(rotINT)
//            rotINT=setInterval("startRotate()",10)
//        }
//        function rotateYDIV()
//        {
//        y=document.getElementById("rotatey1")
//        clearInterval(rotYINT)
//        rotYINT=setInterval("startYRotate()",15)
//        }
//        function startRotate()
//        {
//        n=n+1
//        x.style.transform="rotateX(" + n + "deg)"
//        x.style.webkitTransform="rotateX(" + n + "deg)"
//        x.style.OTransform="rotateX(" + n + "deg)"
//        x.style.MozTransform="rotateX(" + n + "deg)"
//        if (n==180 || n==360)
//            {
//            //clearInterval(rotINT)
//            if (n==360){n=0}
//            }
//        }
//        function startYRotate()
//        {
//        ny=ny+1
//        y.style.transform="rotateY(" + ny + "deg)"
//        y.style.webkitTransform="rotateY(" + ny + "deg)"
//        y.style.OTransform="rotateY(" + ny + "deg)"
//        y.style.MozTransform="rotateY(" + ny + "deg)"
//        if (ny==180 || ny>=360)
//            {
//            //clearInterval(rotYINT)
//            if (ny>=360){ny=0}
//            }
//        }
//        //-->
    </script>
    <?=view("home.common.footer")?>